import Vue from 'vue'

import 'normalize.css/normalize.css' // a modern alternative to CSS resets

// import '@/styles/index.scss' // global css

import Vant from 'vant'
import 'vant/lib/index.css'

import App from './App'
import store from './store'
import router from './router'

import './icons' // icon
import './permission' // permission control

/**
 * If you don't want to use mock-server
 * you want to use MockJs for mock api
 * you can execute: mockXHR()
 *
 * Currently MockJs will be used in the production environment,
 * please remove it before going online! ! !
 */

// import { mockXHR } from '../mock'
// if (process.env.NODE_ENV === 'production') {
//   mockXHR()
// }

Vue.use(Vant)

// // register global utility filters
// Object.keys(filters).forEach(key => {
//   Vue.filter(key, filters[key])
// })

Vue.config.productionTip = false

import ViewCell from '@/components/ViewPage/ViewCell'

import FormO2m from '@/components/FormPage/FormO2m'
// import FieldInput from '@/components/FormPage/FieldInput'

Vue.component('ViewCell', ViewCell)
Vue.component('FormO2m', FormO2m)

// Vue.component('FieldInput', FieldInput)

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
